﻿using System;
using com.eforceglobal.crux.views;
using com.eforceglobal.crux.controllers;

public partial class Login : System.Web.UI.Page, ILogin
{
    LoginController _LoginController;

    protected void Page_Load(object sender, EventArgs e)
    {
        _LoginController = new LoginController(this);
        _LoginController.InitView(IsPostBack);
    }

    protected void Username_Changed(object sender, EventArgs e)
    {
       
    }

    #region ILogin Members

    public string UserName
    {
        get
        {
            return txtUserName.Text.Trim();
        }
        set
        {
            txtUserName.Text = value;
        }
    }

    public string Password
    {
        get
        {
            return txtPassword.Text;
        }
        set
        {
            txtPassword.Text = value;
        }
    }

    public bool AccessDenied
    {
        get
        {
            return pnlAccessDenied.Visible;
        }
        set
        {
            pnlAccessDenied.Visible = value;
        }
    }

    #endregion
   
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        _LoginController.Login();
    }

}
